package cn.iocoder.yudao.module.alipay.controller.app.alipayorder.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;

import java.time.LocalDateTime;
import java.math.BigDecimal;
import javax.validation.constraints.*;
import org.springframework.format.annotation.DateTimeFormat;

import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

/**
 * 支付宝订单 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 */
@Data
public class AlipayOrderBaseVO {

    @Schema(description = "支付宝交易号", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "支付宝交易号不能为空")
    private String tradeNo;

    @Schema(description = "备注")
    private String remark;

    @Schema(description = "支付用户id", requiredMode = Schema.RequiredMode.REQUIRED, example = "9791")
    @NotNull(message = "支付用户id不能为空")
    private String buyerId;

    @Schema(description = "小程序id", requiredMode = Schema.RequiredMode.REQUIRED, example = "22886")
    @NotNull(message = "小程序id不能为空")
    private String appId;

    @Schema(description = "订单返回code", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "订单返回code不能为空")
    private String code;

    @Schema(description = "返回描述", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "返回描述不能为空")
    private String message;

    @Schema(description = "订单状态", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "订单状态不能为空")
    private String orderStatues;

    @Schema(description = "订单时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime orderTime;

    @Schema(description = "交易金额")
    private BigDecimal totalAmount;

    @Schema(description = "销售价")
    private BigDecimal retailPrise;

    @Schema(description = "原价")
    private BigDecimal costPrise;

    @Schema(description = "单个房间利润")
    private BigDecimal profit;

    @Schema(description = "购买商品", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "购买商品不能为空")
    private String subject;

    @Schema(description = "商家自定义订单号", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "商家自定义订单号不能为空")
    private String outTradeNo;

}
